package com.decent.service;

import com.decent.vo.OrderDetailVO;
import com.decent.entity.common.Message;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * @author decent
 */
public interface OrderService {

    /**
     * 立即下单(计算获取订单信息)
     * @param productId 产品Id
     * @param count 购买数
     * @param uid 用户id
     * @return 消息信息
     */
    public Message orderSubmit(Long productId, Integer count, Integer uid);

    /**
     * 立即支付
     * @param productId 产品Id
     * @param count 购买数
     * @param uid 用户id
     * @return orderId payPrice
     */
    public Message orderPay(Long productId, Integer count, Integer uid);


    /**
     * 我的订单
     * @param pageNumber 页码
     * @param pageSize 每页数量
     * @param orderStatus 订单状态 默认：SUCCESS
     * @param uid
     *
     * @return
     */
    public PageInfo<OrderDetailVO> listUserOrder(Integer pageNumber, Integer pageSize, String orderStatus, Integer uid);

    /**
     * 查看卡券(订单产品详情)
     * @param orderId 订单id
     * @param uid 用户id
     * @return
     */
    public List<OrderDetailVO> detailsOrder(Long orderId, Integer uid);
}
